<?php /* @var $this Controller */ ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="language" content="en" />

        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/styles.css" />

        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/bootstrap.css" />
        <script src='<?php echo Yii::app()->theme->baseUrl; ?>/js/bootstrap.js'></script>        

        
        <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
        <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
        <script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>     

        <!-- FullCalendar-->
        <link rel='stylesheet' href='<?php echo Yii::app()->theme->baseUrl; ?>/css/fullcalendar.css' />
        <link rel='stylesheet' media='print' href='<?php echo Yii::app()->theme->baseUrl; ?>/css/fullcalendar.print.css' />
        <script src='<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.min.js'></script>
        <script src='<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery-ui.custom.min.js'></script>
        <script src='<?php echo Yii::app()->theme->baseUrl; ?>/js/fullcalendar.min.js'></script>    

        <title><?php echo CHtml::encode($this->pageTitle); ?></title>

        <?php Yii::app()->bootstrap->register(); ?>
    </head>

    <?php
    $admin = (isset(Yii::app()->user->perfil) and Yii::app()->user->perfil == 'ADMIN') ? true : false;
    $this->widget('bootstrap.widgets.TbNavbar', array(
        'items' => array(
            array(
                'class' => 'bootstrap.widgets.TbMenu',
                'items' => array(
                    array('label' => 'Home', 'url' => array('/site/index')),
                    //array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
                    //array('label'=>'Contact', 'url'=>array('/site/contact')),
                    array('label' => 'Curso', 'url' => array('/curso/index')),
                    array('label' => 'JP', 'url' => array('/jp/index')),
                    array('label' => 'Colegios', 'url' => array('/colegios/index')),
                    array('label' => 'Evaluacion', 'url' => array('/evaluacion/index')),
                    array('label' => 'Usuario', 'url' => array('/usuario/index'), 'visible' => $admin),
                    array('label' => 'Login', 'url' => array('/site/login'), 'visible' => Yii::app()->user->isGuest),
                    array('label' => 'Logout (' . Yii::app()->user->name . ')', 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest)
                ),
    ))));
    ?>

    <div class="container" id="page">

        <?php if (isset($this->breadcrumbs)): ?>
            <?php
            $this->widget('bootstrap.widgets.TbBreadcrumbs', array(
                'links' => $this->breadcrumbs,
            ));
            ?><!-- breadcrumbs -->
        <?php endif ?>

        <?php echo $content;
        date_default_timezone_set('America/Lima'); ?>

        <div class="clear"></div>                
        
        <div id="footer" align="center">
            Copyright &copy; <?php echo date('Y'); ?> by Infopuc.<br/>
            All Rights Reserved.<br/>
            <?php echo Yii::powered(); ?>
        </div><!-- footer -->

    </div><!-- page -->
    
</body>
</html>
